package com.xp.record25.bio;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.StandardCharsets;

public class NewBioClient {

    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress(8888));

        sc.write(StandardCharsets.UTF_8.encode("hello xp"));

        System.out.println(" 消息已经发送了");
    }
}
